Recognizing Algorithms Using Language Constructs, Software Metrics and Roles of Variables: An Experiment with Sorting Algorithms

نویسندگان

  • Ahmad Taherkhani
  • Ari Korhonen
  • Lauri Malmi
چکیده

Program comprehension (PC) is a research field that has been extensively studied from different points of view, including human program understanding and mental models, automated program understanding, etc. In this paper, we discuss algorithm recognition (AR) as a subfield of PC and explain their relationship. We present a method for automatic AR from Java source code. The method is based on static analysis of program code including various statistics of language constructs, software metrics, as well as analysis of roles of variables in the target program. In the first phase of the method, a number of different implementations of the supported algorithms are analyzed and stored in the knowledge base of the system as learning data, and in the second phase, previously unseen algorithms are recognized using this information. We have developed a prototype and successfully applied the method for recognition of sorting algorithms. This process is explained in the paper along with the experiment we have conducted to evaluate the performance of the method. Although the method, at its current state, is still sensitive to changes made to target algorithms, the encouraging results of the experiment demonstrate that it can be further developed to be used as a PC method in various applications, as an example, in automatic assessment tools to check the algorithms used by students, the functionality that is currently missing from these tools.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Recognizing Algorithms Using Roles of Variables, Language Constructs and Software Metrics: A Machine Learning Approach

Roles of Variables (RoV) are concepts that describe the behavior and usage of variables in computer programs. RoV have originally been introduced to help novices learn programming. Algorithm Recognition (AR) is a subfield of program comprehension, where the problem is to identify algorithms from the source code. AR covers recognizing different algorithms that carry out different computational t...

متن کامل

Using Decision Tree Classifiers in Source Code Analysis to Recognize Algorithms: An Experiment with Sorting Algorithms

We discuss algorithm recognition (AR) and present a method for recognizing algorithms automatically from Java source code. The method consists of two phases. In the first phase, the recognizable algorithms are converted into the vectors of characteristics, which are computed based on static analysis of program code, including various statistics of language constructs and analysis of Roles of Va...

متن کامل

A knowledge-based NSGA-II approach for scheduling in virtual manufacturing cells

This paper considers the job scheduling problem in virtual manufacturing cells (VMCs) with the goal of minimizing two objectives namely, makespan and total travelling distance. To solve this problem two algorithms are proposed: traditional non-dominated sorting genetic algorithm (NSGA-II) and knowledge-based non-dominated sorting genetic algorithm (KBNSGA-II). The difference between these algor...

متن کامل

Automatic Algorithm Recognition Based on Programming Schemas and Beacons - A Supervised Machine Learning Classification Approach

Aalto University, P.O. Box 11000, FI-00076 Aalto www.aalto.fi Author Ahmad Taherkhani Name of the doctoral dissertation Automatic Algorithm Recognition Based on Programming Schemas and Beacons: A Supervised Machine Learning Classification Approach Publisher Aalto University School of Science Unit Department of Computer Science and Engineering Series Aalto University publication series DOCTORAL ...

متن کامل

Assessment of the Conservation Area Network Development in Markazi Province Using Landscape Metrics

Prioritization and selection of sample areas from the whole nature is necessary to protect biodiversity. The main purpose of this study was to evaluate the development of a network of conservation areas in Markazi province using landscape metrics. For this purpose, we used MaxEnt, Marxan, Fragstat softwares and eight conservation criteria. Results were compared by using simulated sorting, greed...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Comput. J.

دوره 54  شماره 

صفحات  -

تاریخ انتشار 2011